package com.example.demo.override;

public class Animal {

    public void eat(){

    }

}
class Human extends Animal{

    @Override
    public void eat() {
        System.out.println("eat fice");
    }
}



class TestA{

    public static void main(String[] args) {
        Animal a = new Human();
        a.eat();
    }
}